<?php 
error_reporting(0);
require_once 'Excel/reader.php';
   require("config.php");
$data = new Spreadsheet_Excel_Reader();

// Set output Encoding.
$data->setOutputEncoding('UTF-8');
$data->read('example.xls');
$table= $data->sheets[0];
$max=$table['numRows']; // row 
$maxw=$table['numCols']; // col
$dall=$table['cells'];
$tmax=$_REQUEST['tmax'];
for ($i = 0; $i < $tmax; $i++) {
     $postarr[$i]=$_REQUEST['t'.$i];
}
$t=$dall[1];
$k=0;
for ($i = 1; $i <= sizeof($t); $i++) {
    for ($j = 0; $j < sizeof($searchwords); $j++) {
        if($t[$i]==$searchwords[$j]){
            $ssite[$k]=$i;
            $k++;
        }
        
        
    }
    
    
}
$mustmax=sizeof($ssite);
for ($i = 2; $i <= sizeof($dall); $i++) {
    $d=array(); 
    $d=$dall[$i];
    $flag=0;
    for ($j = 1; $j <= sizeof($d); $j++) {
        for ($k = 0; $k < sizeof($postarr); $k++) {
              if($d[$j]==$postarr[$k]){
                 $flag++;
              }
        }
   
        
    }
      if($mustmax==$flag){
          $dnew=$d;break;
      }
   
}
 
?>



<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no">
	<meta name="robots" content="index, follow">
    <link rel="shortcut icon" type="image/png" href="favicon.png">
    
	<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css?5015">
	<link rel="stylesheet" type="text/css" href="style.css?963">
	<link rel="stylesheet" type="text/css" href="./css/all.min.css">
	
    <title>查询结果</title>


    
<!-- Analytics -->
 
<!-- Analytics END -->
    
</head>
<body >

<!-- Preloader -->
 
<!-- Preloader END -->


<!-- Main container -->
<div class="page-container">
 
<!-- bloc-2 -->
<div class="bloc l-bloc full-width-bloc" id="bloc-2" >
	<div class="container" style="background:url('img/bg.jpg');height: 100vh;width:100vw;background-size: cover;">
	<div class="row" >
			<div class="col"  style="height:500px;margin: 38px;background: #ffffffdb;border-radius: 22px;padding:0px 22px 22px 22px;">
			    
			    <h3 style="text-align:center;margin-top:15%;color:#ff9b07">查询结果</h3>
			    <HR><BR>
			        <?php 
			        for ($i = 1; $i <= sizeof($dnew); $i++) {
			             // code...
			       
			        
			        ?>
			        
			    <p><?=$t[$i]?>：<?=$dnew[$i]?> </p>
		 
			        <?php 
		
			        }
			        
			        ?>
			     
			     
			      <HR>
			    <div style="text-align:center;margin-top:15%;">     <a href="." class="btn" style="color:white;background:#ff9b07;width:120px">返回</a></div>
			    
			</div>
		</div>
 
	 
		
 
		
	</div>
</div>
<!-- bloc-2 END -->
 

 


</div>
<!-- Main container END -->
    


<!-- Additional JS -->
<script src="./js/jquery.min.js?534"></script>
<script src="./js/bootstrap.bundle.min.js?1191"></script>
<script src="./js/blocs.min.js?5517"></script>
<script src="./js/lazysizes.min.js" defer></script><!-- Additional JS END -->


</body>
</html>
